package com.wz.project.system.item.service;

import com.wz.project.system.item.domain.Item;
import com.wz.project.system.item.domain.ItemDetail;
import com.wz.project.system.item.domain.ItemDetails;
import com.wz.project.system.item.domain.ItemDetailss;
import com.wz.project.system.item.mapper.ItemMapper;
import com.wz.project.system.prjgroup.domain.Prjgroup;
import com.wz.project.system.prjgroup.mapper.PrjGroupMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ItemServiceImpl implements ItemService{
    @Autowired
    private ItemMapper itemMapper;

    @Autowired
    private PrjGroupMapper prjGroupMapper;
    @Override
    public List<Item> selectItemList(Item item) {
        return itemMapper.selectItemList(item);
    }

    @Override
    public ItemDetail selectUserGroupByPrjld(Integer prjId) {
        return itemMapper.selectUserGroupByPrjld(prjId);
    }
    @Override
    public List<ItemDetailss> selectDetailByPrjld(Integer prjId) {
        return itemMapper.selectDetailByPrjld(prjId);
    }

    @Override
    public int insertItem(Item item) {
        return itemMapper.insertItem(item);
    }

    @Override
    public int deleteItemByIds(Integer ids) {
        return this.itemMapper.deleteItemByIds(ids);
    }

    @Override
    public Item selectItemByItemPrjID(Integer prjID) {
        return this.itemMapper.selectItemByItemPrjID(prjID);
    }

    @Override
    public int saveAndUpdate(Item item) {
        return this.itemMapper.saveAndUpdate(item);
    }

    @Override
    public List<Prjgroup> selectPrjgroupByDeptId(Integer deptId) {
        return itemMapper.selectPrjgroupByDeptId(deptId);
    }

    @Override
    public List<ItemDetails> selectItemDetailsList(ItemDetails itemDetails) {
        return itemMapper.selectItemDetailsList(itemDetails);
    }


}
